package tech.horgee.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Getter
@Setter
@Component
@ConfigurationProperties(prefix = "app")
public class AppConfig {
    /**
     * 本地文件存储路径
     */
    public static String filePath;

    /**
     * 鉴权开关
     */
    private boolean auth;

    public void setFilePath(String path) {
        filePath = path;
    }

    /**
     * 获取头像上传路径
     */
    public static String getAvatarPath() {
        return filePath + "/avatar";
    }

}
